<template>
  <table>
    <thead>
      <tr>
        <th>序号</th>
        <th>姓名</th>
        <th>年龄</th>
        <th>操作</th>
      </tr>
    </thead>

    <tbody>
      <tr v-for="(item,index) in data" :key="item.id">
        <td>{{ index+1 }}</td>
        <td>{{ item.name }}</td>
        <td>{{ item.age }}</td>
        <td>
          <!-- 作用域 插槽 -->
          <slot :row="item" msg="message">
            <!-- <button @click="del(obj.row.id)">删除</button> -->
            <!-- <button @click="show(row)">查看</button> -->
          </slot>
        </td>
      </tr>
    </tbody>
  </table>
</template>
<script>
  export default {
    props:{
      data:Array
    }
  }
</script>

<style scoped>

</style>